'\" te
.\"  Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH FSCK_UDFS 8 "Nov 26, 2017"
.SH NAME
fsck_udfs \- file system consistency check and interactive repair
.SH SYNOPSIS
.LP
.nf
\fBfsck\fR \fB-F\fR udfs [\fIgeneric_options\fR] [\fIspecial \|.\|.\|.\fR]
.fi

.LP
.nf
\fBfsck\fR \fB-F\fR udfs [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
     [\fIspecial \|.\|.\|.\fR]
.fi

.SH DESCRIPTION
.LP
\fBfsck\fR audits and interactively repairs inconsistent conditions on file
systems. A file system to be checked can be specified by giving the name of the
block or character special device or by giving the name of its mount point if a
matching entry exists in \fB/etc/vfstab\fR.
.sp
.LP
\fIspecial\fR represents the character special device, for example,
\fB/dev/rdsk/c0t2d0s0\fR, on which the file system resides. The character
special device, not the block special device should be used. \fBfsck\fR does
not work on a mounted block device.
.sp
.LP
If no special device is specified, all \fBudfs\fR file systems specified in the
\fBvfstab\fR file with a \fBfsckdev\fR entry are checked. If the \fB-p\fR
(\fBpreen\fR) option is specified, \fBudfs\fR file systems with an
\fBfsckpass\fR number greater than \fB1\fR are checked in parallel. See
\fBfsck\fR(8).
.sp
.LP
In the case of correcting serious inconsistencies, by default, \fBfsck\fR asks
for confirmation before making a repair and waits for the operator to respond
with either \fByes\fR or \fBno\fR. If the operator does not have write
permission on the file system, \fBfsck\fR defaults to the \fB-n\fR (no
corrections) option. See \fBfsck\fR(8).
.sp
.LP
Repairing some file system inconsistencies can result in loss of data. The
amount and severity of data loss can be determined from the diagnostic output.
.sp
.LP
\fBfsck\fR automatically corrects innocuous inconsistencies. It displays a
message for each corrected inconsistency that identifies the nature of the
correction which took place on the file system. After successfully correcting a
file system, \fBfsck\fR prints the number of files on that file system and the
number of used and free blocks.
.sp
.LP
Inconsistencies checked are as follows:
.RS +4
.TP
.ie t \(bu
.el o
Blocks claimed by more than one file or the free list
.RE
.RS +4
.TP
.ie t \(bu
.el o
Blocks claimed by a file or the free list outside the range of the file system
.RE
.RS +4
.TP
.ie t \(bu
.el o
Incorrect link counts in file entries
.RE
.RS +4
.TP
.ie t \(bu
.el o
Incorrect directory sizes
.RE
.RS +4
.TP
.ie t \(bu
.el o
Bad file entry format
.RE
.RS +4
.TP
.ie t \(bu
.el o
Blocks not accounted for anywhere
.RE
.RS +4
.TP
.ie t \(bu
.el o
Directory checks, file pointing to unallocated file entry and absence of a
parent directory entry
.RE
.RS +4
.TP
.ie t \(bu
.el o
Descriptor checks, more blocks for files than there are in the file system
.RE
.RS +4
.TP
.ie t \(bu
.el o
Bad free block list format
.RE
.RS +4
.TP
.ie t \(bu
.el o
Total free block count incorrect
.RE
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fIgeneric_options\fR\fR
.ad
.RS 23n
The following \fIgeneric_options\fR are supported:
.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.RS 11n
Check but do not repair. This option checks to be sure that the file system is
suitable for mounting, and returns the appropriate exit status. If the file
system is ready for mounting, \fBfsck \fRdisplays a message such as:
.sp
.in +2
.nf
udfs fsck: sanity check: /dev/rdsk/c0t2d0s0 okay
.fi
.in -2
.sp

.RE

.sp
.ne 2
.na
\fB\fB-n\fR | \fB-N\fR\fR
.ad
.RS 11n
Assume a \fBno\fR response to all questions asked by \fBfsck\fR; do not open
the file system for writing.
.RE

.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.RS 11n
Echo the expanded command line, but do not execute the command. This option can
be used to verify and to validate the command line.
.RE

.sp
.ne 2
.na
\fB\fB-y\fR | \fB-Y\fR\fR
.ad
.RS 11n
Assume a \fByes\fR response to all questions asked by \fBfsck\fR.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-o\fR \fIspecific_options\fR\fR
.ad
.RS 23n
Specify \fBudfs\fR file system specific options in a comma-separated list with
no intervening spaces. The following \fIspecific_options\fR are available:
.sp
.ne 2
.na
\fB\fBf\fR\fR
.ad
.RS 5n
Force checking of file systems regardless of the state of their logical volume
integrity state.
.RE

.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.RS 5n
Check and fix the file system non-interactively (\fBpreen\fR). Exit immediately
if there is a problem that requires intervention. This option is required to
enable parallel file system checking.
.RE

.sp
.ne 2
.na
\fB\fBw\fR\fR
.ad
.RS 5n
Check writable file systems only.
.RE

.RE

.SH FILES
.ne 2
.na
\fB\fB/etc/vfstab\fR\fR
.ad
.RS 15n
List of default parameters for each file system.
.RE

.SH SEE ALSO
.LP
.BR vfstab (5),
.BR attributes (7),
.BR fsck (8),
.BR fsdb_udfs (8),
.BR fstyp (8),
.BR mkfs (8),
.BR mkfs_udfs (8),
.BR mountall (8),
.BR reboot (8)
.SH WARNINGS
.LP
The operating system buffers file system data. Running \fBfsck\fR on a mounted
file system can cause the operating system's buffers to become out of date with
respect to the disk. For this reason, use \fBfsck\fR only when the file system
is unmounted. If this is not possible, take care that the system is quiescent
and that it is rebooted immediately after running \fBfsck\fR. A panic will
probably occur if running \fBfsck\fR on a file system that modifies the file
system while it is mounted.
.sp
.LP
If an unmount of the file system is not done before the system is shut down,
the file system might become corrupted. In this case, a file system check needs
to be completed before the next mount operation.
.SH DIAGNOSTICS
.ne 2
.na
\fBnot writable\fR
.ad
.sp .6
.RS 4n
You cannot write to the device.
.RE

.sp
.ne 2
.na
\fBCurrently Mounted on\fR
.ad
.sp .6
.RS 4n
The device is already mounted and cannot run \fBfsck\fR.
.RE

.sp
.ne 2
.na
\fBFILE SYSTEM WAS MODIFIED\fR
.ad
.sp .6
.RS 4n
File system has been modified to bring it to a consistent state.
.RE

.sp
.ne 2
.na
\fBCan't read allocation extent\fR
.ad
.sp .6
.RS 4n
Cannot read the block containing allocation extent.
.RE

.sp
.ne 2
.na
\fBBad tag on alloc extent\fR
.ad
.sp .6
.RS 4n
Invalid tag detected when expecting an allocation extent.
.RE

.sp
.ne 2
.na
\fBVolume sequence tag error\fR
.ad
.sp .6
.RS 4n
Invalid tag detected in the volume sequence.
.RE

.sp
.ne 2
.na
\fBSpace bitmap tag error\fR
.ad
.sp .6
.RS 4n
Invalid tag detected in the space bitmap.
.RE

.sp
.ne 2
.na
\fBUNEXPECTED INCONSISTENCY; RUN fsck MANUALLY\fR
.ad
.sp .6
.RS 4n
Use \fBfsck\fR in interactive mode.
.RE

